/*
 * @Descripttion:
 * @version:
 * @Author: yuanpingfang
 * @Date: 2021-05-24 11:17:42
 * @LastEditors: yuanpingfang
 * @LastEditTime: 2021-05-27 18:40:03
 */
import request from "@/utils/request";

// 查询模型列表
export function listModel(query) {
  return request({
    url: "/workflow/model/list",
    method: "get",
    params: query
  });
}

// 查询模型详细
export function getModel(id) {
  return request({
    url: "/workflow/model/" + id,
    method: "get"
  });
}

// 新增模型
export function addModel(data) {
  return request({
    url: "/workflow/model",
    method: "post",
    data: data
  });
}
// 部署模型
export function deployModel(id) {
  return request({
    url: "/workflow/model/deploy/" + id,
    method: "get"
  });
}

// 修改模型
export function updateModel(data) {
  return request({
    url: "/workflow/model",
    method: "put",
    data: data
  });
}

// 删除模型
export function delModel(id) {
  return request({
    url: "/workflow/model/" + id,
    method: "delete"
  });
}

// 导出模型
export function exportModel(query) {
  return request({
    url: "/workflow/model/export",
    method: "get",
    params: query
  });
}
